import { Router } from 'express';
import * as Controller from '../api/controllers/appropriation.controller';

const router = Router();

router
  .route('/')
  .get(
    Controller.getAppropriations
  );

router
  .route('/approved')
  .get(
    Controller.getApprovedAppropriations
  );

router
  .route('/:id')
  .get(
    Controller.getAppropriationById
  );

router
  .route('/')
  .post(
    Controller.addAppropriation
  );

router
  .route('/:id')
  .put(
    Controller.updateAppropriationById
  );

router
  .route('/:id')
  .delete(
    Controller.deleteAppropriationById
  );

export default router;